<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数自调用</title>
</head>
<body>
    <script>
        (function (){
            let num = 100;
            console.log("执行方法了",num);
        })()
    </script>
</body>
</html>